import {Button, Result} from "antd";
import {useNavigate} from "react-router-dom";
import styles from '@/components/Error/404/index.module.less'

const NotFound = () => {
    const navigate = useNavigate();
    const goHome = () => {
        navigate('/home', {replace: true});
    };
    return (
        <Result
            className={styles.antResult}
            status="404"
            title="404"
            subTitle="无法进入此页面，请检查您输入的网址是否正确，或点击下方按钮返回首页。"
            extra={
                <Button type="primary" onClick={goHome}>
                    返回首页
                </Button>
            }
        />
    );
};

export default NotFound;
